<template>
  <div class="inner403-page-container" :class="{'outer403-page-container': !currentPath}">
    <div class="page-background">
    </div>
    <div class="page403-content">
      <div class="page403-title">您没有访问权限！</div>
      <div class="page403-tips">请检查URL地址是否正确, 或点击回到首页。</div>
      <div class="goHome">
        <el-button class="page403-button" type="primary" @click="goHome">回到首页</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: '403',
  computed:{
    currentPath(){
      return this.$route.path.indexOf('function-page') > -1
    },
  },
  methods:{
    goHome(){
      this.$router.push({path: '/'})
    },
  }
}
</script>

<style lang="scss" scoped>
.inner403-page-container{
  background: white;
  padding: 20px;
  box-shadow: 0 0 12px rgba(0, 0,0 , 0.05);
  height: calc(100vh - 180px);
  display: flex;
}
.outer403-page-container{
  height: calc(100vh - 40px);
}
.page-background{
  width: 70%;
  height: 100%;
  background-image: url("../../assets/image/403.png");
  background-size: 80% 100%;
  background-repeat: no-repeat;
  background-position: 100% 0;
}
.page403-content{
  width: 30%;
  height: 100%;
  text-align: left;
}
.page403-title{
  margin-top: 50%;
  font-weight: 600;
  font-size: 18px;
  color: #6cb8ff;
}
.page403-tips{
  margin-top: 20px;
  color: #999999;
}
.goHome{
  margin-top: 20px;
}
.page403-button.el-button--primary{
  padding: 6px 15px;
  background: #6cb8ff;
  border: 1px solid #6cb8ff;
}
</style>
